<section class="menu-carousel hidden-xs">
  <div class="menu-bar <%= controller_name == 'home' && action_name == 'index' ? '' : 'not-home' %>">
    <div class="container content">
      <div class="col-sm-2 category-menu">
        所有商品
        <ul class="lv1-menu <%= controller_name == 'home' && action_name == 'index' ? 'active' : '' %>">
          <% @categories.each do |category| %>
            <li>
              <i class="fa fa-angle-right pull-right"></i>
              <i class="<%= category[0].try(:icon) %>"></i>
              <%= category[0].try(:title) %>
              <div class="lv2-menu">
                <% category[1].each do |item|%>
                  <a href="/products?category_id=<%= item.id %>">
                    <%= item.try(:title) %>
                  </a>
                <% end -%>
              </div>
            </li>
            <% if category[0].is_floor? %>
              <% Category.get_spaces.each do |cate| %>
                <li class="sub">
                  <i class="<%= cate.try(:icon) %>"></i>
                  <a href="/products?category_id=<%= cate.id %>">
                    <%= cate.title %>
                  </a>
                </li>
              <% end %>
            <% end %>
          <% end -%>
        </ul>
      </div>

      <div class="col-sm-10 bar-menu">
        <a href="/">首页</a>
        <a href="/promotions">活动促销</a>
        <a href="/wiki">门窗百科</a>
        <a href="/designers">家装“设”团</a>
        <a href="/service_outlets.html">服务网点</a>
        <a href="/product_cases">推荐案例</a>
      </div>

      <% if controller_name == 'home' && action_name == 'index' %>
        <home-reserve></home-reserve>
      <% end -%>
    </div>
  </div>

  <% if controller_name == 'home' && action_name == 'index' %>
    <div class="home-carousel-menu">
      <home-carousel></home-carousel>
    </div>
  <% end -%>
</section>
<% if controller_name == 'home' && action_name == 'index' %>
<%= render partial: 'home/reserve' %>
<% end %>
